﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SongSharp.Domain;
using SongSharp.Domain.Queueing;
using SongSharp.Domain.Objects;

namespace SongSharp.Appliance
{
    public static class QueueApp
    {
        public static QueueManager QueueManager { get { return QueueManager.Instance; } }

        public static Track Peek()
        {
            return QueueManager.PlayingQueue.Peek();
        }

        public static Track DeQueue()
        {
            return QueueManager.PlayingQueue.Dequeue();
        }

        public static Track DeQueuePrevious()
        {
            return QueueManager.PlayingQueue.DequeuePrevious();
        }

        public static void Enqueue(Track track)
        {
            QueueManager.PlayingQueue.Enqueue(track);
        }

        public static void EnqueueRange(List<Track> track)
        {
            QueueManager.PlayingQueue.EnqueueRange(track);
        }

        public static void InsertToNext(Track track)
        {
            QueueManager.PlayingQueue.Insert(1, track);
        }

        public static List<Track> List()
        {
            return QueueManager.PlayingQueue.ToList();
        }

        public static void Clear()
        {
            QueueManager.PlayingQueue.Clear();
        }
    }
}
